package com.ruoyi.labmanage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.labmanage.mapper.LabreservationMapper;
import com.ruoyi.labmanage.domain.Labreservation;
import com.ruoyi.labmanage.service.ILabreservationService;

/**
 * 实验室预约Service业务层处理
 * 
 * @author lh
 * @date 2025-01-12
 */
@Service
public class LabreservationServiceImpl implements ILabreservationService 
{
    @Autowired
    private LabreservationMapper labreservationMapper;

    /**
     * 查询实验室预约
     * 
     * @param reservationId 实验室预约主键
     * @return 实验室预约
     */
    @Override
    public Labreservation selectLabreservationByReservationId(Long reservationId)
    {
        return labreservationMapper.selectLabreservationByReservationId(reservationId);
    }

    /**
     * 查询实验室预约列表
     * 
     * @param labreservation 实验室预约
     * @return 实验室预约
     */
    @Override
    public List<Labreservation> selectLabreservationList(Labreservation labreservation)
    {
        return labreservationMapper.selectLabreservationList(labreservation);
    }

    /**
     * 新增实验室预约
     * 
     * @param labreservation 实验室预约
     * @return 结果
     */
    @Override
    public int insertLabreservation(Labreservation labreservation)
    {
        return labreservationMapper.insertLabreservation(labreservation);
    }

    /**
     * 修改实验室预约
     * 
     * @param labreservation 实验室预约
     * @return 结果
     */
    @Override
    public int updateLabreservation(Labreservation labreservation)
    {
        return labreservationMapper.updateLabreservation(labreservation);
    }

    /**
     * 批量删除实验室预约
     * 
     * @param reservationIds 需要删除的实验室预约主键
     * @return 结果
     */
    @Override
    public int deleteLabreservationByReservationIds(Long[] reservationIds)
    {
        return labreservationMapper.deleteLabreservationByReservationIds(reservationIds);
    }

    /**
     * 删除实验室预约信息
     * 
     * @param reservationId 实验室预约主键
     * @return 结果
     */
    @Override
    public int deleteLabreservationByReservationId(Long reservationId)
    {
        return labreservationMapper.deleteLabreservationByReservationId(reservationId);
    }
}
